import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '渠道号',
    align: "center",
    dataIndex: 'cpid'
  },
  {
    title: '日限量',
    align: "center",
    dataIndex: 'daynum'
  },
  {
    title: '业务代码',
    align: "center",
    dataIndex: 'paycode'
  },
  {
    title: '业务名称',
    align: "center",
    dataIndex: 'servicename'
  },
  {
    title: '是否限量',
    align: "center",
    dataIndex: 'dataswitch',
    customRender:({text}) => {
       return  render.renderSwitch(String(text), [{text:'是',value:'1'},{text:'否',value:'0'}]);
     },
  },
  {
    title: '表',
    align: "center",
    dataIndex: 'datatable_dictText'
  },
];

// 高级查询数据
export const superQuerySchema = {
  cpid: {title: '渠道号',order: 0,view: 'text', type: 'string',},
  daynum: {title: '日限量',order: 1,view: 'number', type: 'number',},
  paycode: {title: '业务代码',order: 2,view: 'text', type: 'string',},
  servicename: {title: '业务名称',order: 3,view: 'text', type: 'string',},
  dataswitch: {title: '是否限量',order: 4,view: 'number', type: 'number',},
  datatable: {title: '表',order: 5,view: 'number', type: 'number',dictCode: 'data_table',},
};
